%@ CodePage="28592" %>
<%
Response.Buffer = EW_RESPONSE_BUFFER
%>
<% Call ew_Header(False, EW_CHARSET, False) %>
<% Server.ScriptTimeout = 90 %>
<%
' Define page object
Dim Demarrage_list
Set Demarrage_list = New cDemarrage_list
Set Page = Demarrage_list
' Page init processing
Call Demarrage_list.Page_Init
' Page main
Call Demarrage_list.Page_Main
' Global Page Rendering event (in userfn*.asp)
Page_Rendering()
' Page Render event
Demarrage_list.Page_Render()
%>
<% If Demarrage.Export = "" Then %>
<% End If %>
<% If Demarrage.Export = "" Then %>
<% If Demarrage_list.TotalRecs > 0 And Demarrage_list.ExportOptions.Visible Then %>
<% Call Demarrage_list.ExportOptions.Render("body", "", "", "", "", "") %>
<% End If %>
<% End If %>
<% If Demarrage.Export = "" Or EW_EXPORT_MASTER_RECORD And Demarrage.Export = "print" Then %>
<% End If %>
<%
'Demarrage_list.TotalRecs = Demarrage_list.Recordset.RecordCount ' Already loaded ' ASP
Demarrage_list.StartRec = 1
If Demarrage_list.DisplayRecs <= 0 Then ' Display all records
Demarrage_list.DisplayRecs = Demarrage_list.TotalRecs
End If
If Not (Demarrage.ExportAll And Demarrage.Export <> "") Then
Call Demarrage_list.SetupStartRec ' Set up start record position
End If
' Load records ' ASP
Set Demarrage_list.Recordset = Demarrage_list.LoadRecordset(Demarrage_list.StartRec-1, Demarrage_list.DisplayRecs)
' Set no record found message
If Demarrage.CurrentAction = "" And Demarrage_list.TotalRecs = 0 Then
If Not Security.CanList Then
Demarrage_list.WarningMessage = ew_DeniedMsg()
End If
If Demarrage_list.SearchWhere = "0=101" Then
Demarrage_list.WarningMessage = Language.Phrase("EnterSearchCriteria")
Else
Demarrage_list.WarningMessage = Language.Phrase("NoRecord")
End If
End If
Call Demarrage_list.RenderOtherOptions
%>
<% Call Demarrage_list.ShowPageHeader %>
<% Call Demarrage_list.ShowMessage %>
<% If Demarrage_list.TotalRecs > 0 Or Demarrage.CurrentAction <> "" Then %>
<%
End If
If Demarrage.CurrentAction <> "gridadd" Then
Demarrage_list.Recordset.MoveNext
End If
Loop
%>
<%= Demarrage_list.MultiColumnEndGrid() %>
<% End If %>
<% If Demarrage.CurrentAction = "" Then %>
<% End If %>
<%
' Close recordset and connection
Demarrage_list.Recordset.Close
Set Demarrage_list.Recordset = Nothing
%>
<% If Demarrage.Export = "" Then %>
<% If Demarrage.CurrentAction <> "gridadd" And Demarrage.CurrentAction <> "gridedit" Then %>
<% End If %>
<% End If %>
<% If Demarrage.Export <> "" Then %>
<% End If %>
<% If Demarrage.Export = "" Then %>
<% End If %>
<%
Call Demarrage_list.ShowPageFooter
If EW_DEBUG_ENABLED Then Response.Write ew_DebugMsg()
%>
<% If Demarrage.Export = "" Then %>
<% End If %>
<%
' Clean up and drop page object
Call Demarrage_list.Page_Terminate("")
Set Demarrage_list = Nothing
%>
<%
'
' Page Class
'
Class cDemarrage_list
' Page ID
Public Property Get PageID
PageID = "list"
End Property
' Project ID
Public Property Get ProjectID
ProjectID = "{a0407fca-ef49-407e-8f01-84fc45af21f8}"
End Property
' Table Name
Public Property Get TableName
TableName = "Demarrage"
End Property
' Page Object Name
Public Property Get PageObjName
PageObjName = "Demarrage_list"
End Property
' Field (NumId)
Public Property Get NumId
Set NumId = Demarrage.NumId
End Property
' Field (Aide)
Public Property Get Aide
Set Aide = Demarrage.Aide
End Property
' Field (Help)
Public Property Get Help
Set Help = Demarrage.Help
End Property
' Get field object dictionary (ASP)
Public Property Get Fields
Set Fields = Demarrage.Fields
End Property
' Get field object by name (alias of Fields) (ASP)
Public Function GetField(Name)
Set GetField = Fields.Get(Name)
End Function
' Get field object by parm (ASP)
Public Function GetFieldByParm(Parm)
Dim keys, key
keys = Fields.Keys()
For Each key In keys
If Fields.Get(key).FldParm = Parm Then
Set GetFieldByParm = Fields.Get(key)
Exit Function
End If
Next
Set GetFieldByParm = Nothing
End Function
' Custom actions (ASP)
Dim CustomActions
' Export document (ASP)
Dim ExportDoc
' Grid form hidden field names
Dim FormName
Dim FormActionName
Dim FormKeyName
Dim FormOldKeyName
Dim FormBlankRowName
Dim FormKeyCountName
' Page headings
Dim Heading
Dim Subheading
' Page heading
Function PageHeading()
PageHeading = ""
If Heading <> "" Then
PageHeading = Heading
ElseIf ew_NotEmpty(Demarrage) Then
PageHeading = Demarrage.TableCaption
End If
End Function
' Page subheading
Function PageSubheading()
If Subheading <> "" Then
PageSubheading = Subheading
Else
PageSubheading = ""
If TableName <> "" Then
PageSubheading = Language.Phrase(PageID)
End If
End If
End Function
' Page Name
Public Property Get PageName
PageName = ew_CurrentPage()
End Property
' Page Url
Public Property Get PageUrl
PageUrl = ew_CurrentPage() & "?"
If Demarrage.UseTokenInUrl Then PageUrl = PageUrl & "t=" & Demarrage.TableVar & "&" ' add page token
End Property
' Common URLs
Dim AddUrl
Dim EditUrl
Dim CopyUrl
Dim DeleteUrl
Dim ViewUrl
Dim ListUrl
' Export URLs
Dim ExportPrintUrl
Dim ExportHtmlUrl
Dim ExportExcelUrl
Dim ExportWordUrl
Dim ExportXmlUrl
Dim ExportCsvUrl
Dim ExportPdfUrl
' Custom export
Dim ExportExcelCustom
Dim ExportWordCustom
Dim ExportPdfCustom
Dim ExportEmailCustom
' Inline URLs
Dim InlineAddUrl
Dim InlineCopyUrl
Dim InlineEditUrl
Dim GridAddUrl
Dim GridEditUrl
Dim MultiDeleteUrl
Dim MultiUpdateUrl
' Message
Public Property Get Message
Message = Session(EW_SESSION_MESSAGE)
End Property
Public Property Let Message(v)
Dim msg
msg = Session(EW_SESSION_MESSAGE)
Call ew_AddMessage(msg, v)
Session(EW_SESSION_MESSAGE) = msg
End Property
Public Property Get FailureMessage
FailureMessage = Session(EW_SESSION_FAILURE_MESSAGE)
End Property
Public Property Let FailureMessage(v)
Dim msg
msg = Session(EW_SESSION_FAILURE_MESSAGE)
Call ew_AddMessage(msg, v)
Session(EW_SESSION_FAILURE_MESSAGE) = msg
End Property
Public Property Get SuccessMessage
SuccessMessage = Session(EW_SESSION_SUCCESS_MESSAGE)
End Property
Public Property Let SuccessMessage(v)
Dim msg
msg = Session(EW_SESSION_SUCCESS_MESSAGE)
Call ew_AddMessage(msg, v)
Session(EW_SESSION_SUCCESS_MESSAGE) = msg
End Property
Public Property Get WarningMessage
WarningMessage = Session(EW_SESSION_WARNING_MESSAGE)
End Property
Public Property Let WarningMessage(v)
Dim msg
msg = Session(EW_SESSION_WARNING_MESSAGE)
Call ew_AddMessage(msg, v)
Session(EW_SESSION_WARNING_MESSAGE) = msg
End Property
' Methods to clear message
Public Sub ClearMessage()
Session(EW_SESSION_MESSAGE) = ""
End Sub
Public Sub ClearFailureMessage()
Session(EW_SESSION_FAILURE_MESSAGE) = ""
End Sub
Public Sub ClearSuccessMessage()
Session(EW_SESSION_SUCCESS_MESSAGE) = ""
End Sub
Public Sub ClearWarningMessage()
Session(EW_SESSION_WARNING_MESSAGE) = ""
End Sub
Public Sub ClearMessages()
Session(EW_SESSION_MESSAGE) = ""
Session(EW_SESSION_FAILURE_MESSAGE) = ""
Session(EW_SESSION_SUCCESS_MESSAGE) = ""
Session(EW_SESSION_WARNING_MESSAGE) = ""
End Sub
' Show Message
Public Sub ShowMessage()
Dim hidden, html, sMessage
hidden = False
html = ""
' Message
sMessage = Message
Call Message_Showing(sMessage, "")
If sMessage <> "" Then ' Message in Session, display
If Not hidden Then sMessage = "" & sMessage
html = html & "
" & sMessage & "
"
Session(EW_SESSION_MESSAGE) = "" ' Clear message in Session
End If
' Warning message
Dim sWarningMessage
sWarningMessage = WarningMessage
Call Message_Showing(sWarningMessage, "warning")
If sWarningMessage <> "" Then ' Message in Session, display
If Not hidden Then sWarningMessage = "" & sWarningMessage
html = html & "
" & sWarningMessage & "
"
Session(EW_SESSION_WARNING_MESSAGE) = "" ' Clear message in Session
End If
' Success message
Dim sSuccessMessage
sSuccessMessage = SuccessMessage
Call Message_Showing(sSuccessMessage, "success")
If sSuccessMessage <> "" Then ' Message in Session, display
If Not hidden Then sSuccessMessage = "" & sSuccessMessage
html = html & "
" & sSuccessMessage & "
"
Session(EW_SESSION_SUCCESS_MESSAGE) = "" ' Clear message in Session
End If
' Failure message
Dim sErrorMessage
sErrorMessage = FailureMessage
Call Message_Showing(sErrorMessage, "failure")
If sErrorMessage <> "" Then ' Message in Session, display
If Not hidden Then sErrorMessage = "" & sErrorMessage
html = html & "
" & sErrorMessage & "
"
Session(EW_SESSION_FAILURE_MESSAGE) = "" ' Clear message in Session
End If
Response.Write "
" & html & "
"
End Sub
Dim PageHeader
Dim PageFooter
' Show Page Header
Public Sub ShowPageHeader()
Dim sHeader
sHeader = PageHeader
Call Page_DataRendering(sHeader)
If sHeader <> "" Then ' Header exists, display
Response.Write "
" & sHeader & "
"
End If
End Sub
' Show Page Footer
Public Sub ShowPageFooter()
Dim sFooter
sFooter = PageFooter
Call Page_DataRendered(sFooter)
If sFooter <> "" Then ' Footer exists, display
Response.Write "
" & sFooter & "
"
End If
End Sub
'
' Validate Page request
'
Public Function IsPageRequest()
If Demarrage.UseTokenInUrl Then
IsPageRequest = False
If ew_NotEmpty(ObjForm) Then
IsPageRequest = (Demarrage.TableVar = ObjForm.GetValue("t"))
End If
If Request.QueryString("t").Count > 0 Then
IsPageRequest = (Demarrage.TableVar = Request.QueryString("t"))
End If
Else
IsPageRequest = True
End If
End Function
Dim Token
Dim CheckToken
Dim TokenTimeout
' Valid Post
Function ValidPost()
If Not CheckToken Or Not ew_IsPost() Then
ValidPost = True
Exit Function
End If
If Request.Form(EW_TOKEN_NAME).Count = 0 Then
ValidPost = False
Exit Function
End If
ValidPost = ew_CheckToken(Request.Form(EW_TOKEN_NAME),TokenTimeout)
End Function
' Create Token
Sub CreateToken()
If CheckToken And Token = "" Then
Token = ew_CreateToken()
gsToken = Token ' Save to global variable
End If
End Sub
'
' Class initialize
'
Private Sub Class_Initialize()
Session.LCID = 1033 ' Always use US locale id
If IsEmpty(StartTimer) Then StartTimer = Timer ' Init start time
' Grid form hidden field names
FormName = "fDemarragelist"
FormActionName = "k_action"
FormKeyName = "k_key"
FormOldKeyName = "k_oldkey"
FormBlankRowName = "k_blankrow"
FormKeyCountName = "key_count"
' Check Token
Token = ""
CheckToken = EW_CHECK_TOKEN
TokenTimeout = 0
TokenTimeout = ew_SessionTimeoutTime()
' Initialize language object
If IsEmpty(Language) Then
Set Language = New cLanguage
Call Language.LoadPhrases
End If
' Initialize table object
If IsEmpty(Demarrage) Then Set Demarrage = New cDemarrage
Set Table = Demarrage
ExportExcelCustom = False
ExportWordCustom = False
ExportPdfCustom = True ' Always use ew_ApplyTemplate
ExportEmailCustom = True ' Always use ew_ApplyTemplate
' Initialize URLs
ExportPrintUrl = PageUrl & "export=print"
ExportExcelUrl = PageUrl & "export=excel"
ExportWordUrl = PageUrl & "export=word"
ExportHtmlUrl = PageUrl & "export=html"
ExportXmlUrl = PageUrl & "export=xml"
ExportCsvUrl = PageUrl & "export=csv"
ExportPdfUrl = PageUrl & "export=pdf"
AddUrl = "demarrageadd.asp"
InlineAddUrl = PageUrl & "a=add"
GridAddUrl = PageUrl & "a=gridadd"
GridEditUrl = PageUrl & "a=gridedit"
MultiDeleteUrl = "demarragedelete.asp"
MultiUpdateUrl = "demarrageupdate.asp"
' Initialize other table object
If IsEmpty(Securite) Then Set Securite = New cSecurite
' Initialize form object
Set ObjForm = Nothing
' Get resize object
Call ew_GetResizeObj
' Intialize page id (for backward compatibility)
EW_PAGE_ID = "list"
' Initialize table name (for backward compatibility)
EW_TABLE_NAME = "Demarrage"
' Debug message
Call ew_LoadDebugMsg
' Open connection to the database
If IsEmpty(Conn) Then
Set Conn = ew_Connect(Demarrage.TableDBID)
End If
' User table object (Securite)
If IsEmpty(UserTable) Then
Set UserTable = New cSecurite
Set UserTableConn = ew_GetConn(UserTable.TableDBID)
End If
' List options
Set ListOptions = New cListOptions
ListOptions.TableVar = Demarrage.TableVar
' Custom actions
Set CustomActions = Dictionary()
' Export options
Set ExportOptions = New cListOptions
ExportOptions.TableVar = Demarrage.TableVar
ExportOptions.Tag = "div"
ExportOptions.TagClassName = "ewExportOption"
' Other options
Set AddEditOptions = New cListOptions
AddEditOptions.Tag = "div"
AddEditOptions.TagClassName = "ewAddEditOption"
Set DetailOptions = New cListOptions
DetailOptions.Tag = "div"
DetailOptions.TagClassName = "ewDetailOption"
Set ActionOptions = New cListOptions
ActionOptions.Tag = "div"
ActionOptions.TagClassName = "ewActionOption"
' Filter options
Set FilterOptions = New cListOptions
FilterOptions.Tag = "div"
FilterOptions.TagClassName = "ewFilterOption fDemarragelistsrch"
' List actions
Set ListActions = New cListActions
End Sub
'
' Page_Init
'
Sub Page_Init()
' User profile
Set UserProfile = New cUserProfile
' Security
Set Security = New cAdvancedSecurity
If Not Security.IsLoggedIn() Then Security.AutoLogin()
' Table Permission loading event
If Security.IsLoggedIn() Then Call Security.TablePermission_Loading
Call Security.LoadCurrentUserLevel(ProjectID & TableName)
' Table Permission loaded event
If Security.IsLoggedIn() Then Call Security.TablePermission_Loaded
If Not Security.CanList Then
Call Security.SaveLastUrl
Call Page_Terminate(ew_GetUrl("default.asp"))
End If
If Security.IsLoggedIn() Then
' User ID loading event
Call Security.UserID_Loading
Call Security.LoadUserID
' User ID loaded event
Call Security.UserID_Loaded
End If
' Get grid add count
Dim gridaddcnt
gridaddcnt = Request.QueryString(EW_TABLE_GRID_ADD_ROW_COUNT)
If IsNumeric(gridaddcnt) Then
If gridaddcnt > 0 Then
Demarrage.GridAddRowCount = gridaddcnt
End If
End If
' Set up list options
Call SetupListOptions
Call Demarrage.Aide.SetVisibility(Demarrage)
Call Demarrage.Help.SetVisibility(Demarrage)
' Global page loading event (in userfn*.asp)
Call Page_Loading
' Page load event, used in current page
Call Page_Load
' Check token
If Not ValidPost() Then
Response.Write Language.Phrase("InvalidPostRequest")
Call Page_Terminate("")
Response.End
End If
' Process auto fill
Dim results
If Request.Form("ajax") = "autofill" Then
results = Demarrage.GetAutoFill(Request.Form("name"), Request.Form("q"))
If results <> "" Then
' Clean output buffer
If Response.Buffer Then Response.Clear
Response.Write results
Call Page_Terminate("")
Response.End
End If
End If
' Create Token
Call CreateToken
' Setup other options
Call SetupOtherOptions
' Set up custom action (backward compatibility)
Dim sKey, sAction
For Each sKey In CustomActions.Keys()
sAction = CustomActions.Get(sKey)
Call ListActions.Add(sKey, sAction, True, EW_ACTION_POSTBACK, EW_ACTION_MULTIPLE, "", "glyphicon glyphicon-star ewIcon")
Next
' Show checkbox column if multiple action
Dim listact
For i = 0 to ListActions.Count - 1
Set listact = ListActions(i)
If listact.SelectType = EW_ACTION_MULTIPLE And listact.Allow Then
ListOptions("checkbox").Visible = True
Exit For
End If
Next
End Sub
'
' Page_Terminate
'
Sub Page_Terminate(url)
If Request.Form("customexport")&"" = "" Then
' Page unload event, used in current page
Call Page_Unload
' Global page unloaded event (in userfn*.asp)
Call Page_Unloaded
End If
' Export
If ew_NotEmpty(Demarrage) Then
If Demarrage.Export <> "" And Request.Form("data").Count > 0 Then
Dim sContent
sContent = Request.Form("data")
gsExportFile = Request.Form("filename")
If gsExportFile = "" Then gsExportFile = Demarrage.TableVar
If Demarrage.Export = "pdf" Then
Call ExportPdf(sContent)
ElseIf Demarrage.Export = "email" Then
Response.Write ExportEmail(sContent)
ElseIf Demarrage.Export = "excel" Then
Call ExportExcel(sContent)
ElseIf Demarrage.Export = "word" Then
Call ExportWord(sContent)
End If
End If
End If
Dim sRedirectUrl
sRedirectUrl = url
Call Page_Redirecting(sRedirectUrl)
Call ew_CloseConn ' Close Connection
Set Security = Nothing
Set ListOptions = Nothing
Set CustomActions = Nothing ' ASP
Set ObjForm = Nothing
Set gResizeObj = Nothing
' Go to URL if specified
If gsExport & "" = "" Then
If sRedirectUrl <> "" Then
If Response.Buffer Then Response.Clear
Call ew_SaveDebugMsg
Response.Redirect sRedirectUrl
End If
End If
Set Demarrage = Nothing
Call ew_CleanUp
End Sub
'
' Page_Terminate (End)
'
Dim ListOptions ' List options
Dim ExportOptions ' Export options
Dim SearchOptions ' Search options
Dim AddEditOptions ' Other options (add edit)
Dim DetailOptions ' Other options (detail)
Dim ActionOptions ' Other options (action)
Dim FilterOptions ' Filter options
Dim ListActions ' List actions
Dim SelectedCount
Dim SelectedIndex
Dim DisplayRecs ' Number of display records
Dim StartRec, StopRec, TotalRecs, RecRange
Dim AutoHidePager, AutoHidePageSizeSelector
Dim DefaultSearchWhere ' Default search WHERE clause
Dim SearchWhere
Dim RecCnt
Dim EditRowCnt
Dim StartRowCnt
Dim RowCnt, RowIndex
Dim Attrs
Dim RecPerRow
Dim MultiColumnClass
Dim MultiColumnEditClass
Dim MultiColumnCnt
Dim MultiColumnEditCnt
Dim GridCnt
Dim ColCnt
Dim KeyCount
Dim RowAction
Dim RowOldKey ' Row old key (for copy)
Dim DbMasterFilter, DbDetailFilter
Dim MasterRecordExists
Dim MultiSelectKey
Dim Command
Dim RestoreSearch
Dim Recordset, OldRecordset, DetailPages
'
' Page main
'
Sub Page_Main()
SelectedCount = 0
SelectedIndex = 0
DisplayRecs = 10
RecRange = 10
AutoHidePager = EW_AUTO_HIDE_PAGER
AutoHidePageSizeSelector = EW_AUTO_HIDE_PAGE_SIZE_SELECTOR
RecCnt = 0 ' Record count
KeyCount = 0 ' Key count
StartRowCnt = 1
' Multi Column
RecPerRow = 1
MultiColumnCnt = 12
MultiColumnEditCnt = 12
MultiColumnEditClass = "col-sm-12"
GridCnt = 0
ColCnt = 0
' Search filters
Dim sSrchAdvanced, sSrchBasic, sFilter
sSrchAdvanced = "" ' Advanced search filter
sSrchBasic = "" ' Basic search filter
SearchWhere = "" ' Search where clause
DefaultSearchWhere = ""
sFilter = ""
' Restore search
RestoreSearch = False
' Get command
Command = LCase(Request.QueryString("cmd")&"")
' Master/Detail
DbMasterFilter = "" ' Master filter
DbDetailFilter = "" ' Detail filter
If IsPageRequest Then ' Validate request
' Process list action first
If ProcessListAction() Then ' Ajax request
Call Page_Terminate("")
Response.End
End If
' Set up records per page dynamically
Call SetupDisplayRecs
' Handle reset command
Call ResetCmd
' Set up Breadcrumb
If Demarrage.Export = "" Then
Call SetupBreadcrumb
End If
' Hide list options
If Demarrage.Export <> "" Then
Call ListOptions.HideAllOptions(Array("sequence"))
ListOptions.UseDropDownButton = False ' Disable drop down button
ListOptions.UseButtonGroup = False ' Disable button group
ElseIf Demarrage.CurrentAction = "gridadd" Or Demarrage.CurrentAction = "gridedit" Then
Call ListOptions.HideAllOptions(Array())
ListOptions.UseDropDownButton = False ' Disable drop down button
ListOptions.UseButtonGroup = False ' Disable button group
End If
' Hide options
If Demarrage.Export <> "" Or Demarrage.CurrentAction <> "" Then
Call ExportOptions.HideAllOptions(Array())
Call FilterOptions.HideAllOptions(Array())
End If
' Hide other options
If Demarrage.Export <> "" Then
Call AddEditOptions.HideAllOptions(Array())
Call DetailOptions.HideAllOptions(Array())
Call ActionOptions.HideAllOptions(Array())
End If
' Set Up Sorting Order
Call SetupSortOrder
End If ' End Validate Request
' Restore display records
If Command <> "json" And Demarrage.RecordsPerPage <> "" Then
DisplayRecs = Demarrage.RecordsPerPage ' Restore from Session
Else
DisplayRecs = 10 ' Load default
End If
' Load Sorting Order
If Command <> "json" Then Call LoadSortOrder
sFilter = ""
If Not Security.CanList Then
sFilter = "(0=1)" ' Filter all records
End If
Call ew_AddFilter(sFilter, DbDetailFilter)
Call ew_AddFilter(sFilter, SearchWhere)
' Set up filter
If Command = "json" Then
Demarrage.UseSessionForListSQL = False ' Do not use session for ListSQL
Demarrage.CurrentFilter = sFilter
Else
Demarrage.SessionWhere = sFilter
Demarrage.CurrentFilter = ""
End If
' Load record count first ' ASP
TotalRecs = Demarrage.ListRecordCount()
' Search options
Call SetupSearchOptions
End Sub
'
' Set up number of records displayed per page
'
Sub SetupDisplayRecs()
Dim sWrk
sWrk = Request.QueryString(EW_TABLE_REC_PER_PAGE)
If sWrk <> "" Then
If IsNumeric(sWrk) Then
DisplayRecs = CInt(sWrk)
Else
If LCase(sWrk) = "all" Then ' Display all records
DisplayRecs = -1
Else
DisplayRecs = 10 ' Non-numeric, load default
End If
End If
Demarrage.RecordsPerPage = DisplayRecs ' Save to Session
' Reset start position
StartRec = 1
Demarrage.StartRecordNumber = StartRec
End If
End Sub
'
' Build filter for all keys
'
Function BuildKeyFilter()
Dim rowindex, sThisKey
Dim sKey
Dim sWrkFilter, sFilter
sWrkFilter = ""
' Update row index and get row key
rowindex = 1
ObjForm.Index = rowindex
sThisKey = ObjForm.GetValue("k_key") & ""
Do While sThisKey <> ""
If SetupKeyValues(sThisKey) Then
sFilter = Demarrage.KeyFilter
If sWrkFilter <> "" Then sWrkFilter = sWrkFilter & " OR "
sWrkFilter = sWrkFilter & sFilter
Else
sWrkFilter = "0=1"
Exit Do
End If
' Update row index and get row key
rowindex = rowindex + 1 ' Next row
ObjForm.Index = rowindex
sThisKey = ObjForm.GetValue("k_key") & ""
Loop
BuildKeyFilter = sWrkFilter
End Function
'
' Set up key values
'
Function SetupKeyValues(key)
Dim arrKeyFlds
arrKeyFlds = Split(key&"", EW_COMPOSITE_KEY_SEPARATOR)
If UBound(arrKeyFlds) >= 0 Then
Demarrage.NumId.FormValue = arrKeyFlds(0)
If Not IsNumeric(Demarrage.NumId.FormValue) Then
SetupKeyValues = False
Exit Function
End If
End If
SetupKeyValues = True
End Function
'
' Set up Sort parameters based on Sort Links clicked
'
Sub SetupSortOrder()
Dim sOrderBy
Dim sSortField, sLastSort, sThisSort
Dim bCtrl
' Check for an Order parameter
If Request.QueryString("order").Count > 0 Then
Demarrage.CurrentOrder = Request.QueryString("order")
Demarrage.CurrentOrderType = Request.QueryString("ordertype")
' Field Aide
Call Demarrage.UpdateSort(Demarrage.Aide)
' Field Help
Call Demarrage.UpdateSort(Demarrage.Help)
Demarrage.StartRecordNumber = 1 ' Reset start position
End If
End Sub
'
' Load Sort Order parameters
'
Sub LoadSortOrder()
Dim sOrderBy
sOrderBy = Demarrage.SessionOrderBy ' Get order by from Session
If sOrderBy = "" Then
If Demarrage.SqlOrderBy <> "" Then
sOrderBy = Demarrage.SqlOrderBy
Demarrage.SessionOrderBy = sOrderBy
End If
End If
End Sub
'
' Reset command based on querystring parameter "cmd"
'
Sub ResetCmd()
' Check if reset command
If Left(Command,5) = "reset" Then
' Reset Sort Criteria
If Command = "resetsort" Then
Dim sOrderBy
sOrderBy = ""
Demarrage.SessionOrderBy = sOrderBy
Demarrage.Aide.Sort = ""
Demarrage.Help.Sort = ""
End If
' Reset start position
StartRec = 1
Demarrage.StartRecordNumber = StartRec
End If
End Sub
' Set up list options
Sub SetupListOptions()
Dim item
' Add group option item
Set item = ListOptions.Add(ListOptions.GroupOptionName)
item.Body = ""
item.OnLeft = True
item.Visible = False
' List actions
Set item = ListOptions.Add("listactions")
item.CssClass = "text-nowrap;"
item.OnLeft = True
item.Visible = False
item.ShowInButtonGroup = False
item.ShowInDropDown = False
' Checkbox
Set item = ListOptions.Add("checkbox")
item.Visible = False
item.OnLeft = True
item.Header = ""
Call item.MoveTo(0) ' Move to first column
item.ShowInDropDown = False
item.ShowInButtonGroup = False
' Drop down button for ListOptions
ListOptions.UseImageAndText = True
ListOptions.UseDropDownButton = False
ListOptions.DropDownButtonPhrase = Language.Phrase("ButtonListOptions")
ListOptions.UseButtonGroup = True
If ListOptions.UseButtonGroup And ew_IsMobile() Then
ListOptions.UseDropDownButton = True
End If
ListOptions.ButtonClass = "btn-sm" ' Class for button group
Call ListOptions_Load
Call SetupListOptionsExt
' Set up group item visibility
ListOptions(ListOptions.GroupOptionName).Visible = ListOptions.GroupOptionVisible
End Sub
' Render list options
Sub RenderListOptions()
Dim item, links, cancelurl
Call ListOptions.LoadDefault
' Call ListOptions_Rendering event
Call ListOptions_Rendering
' Set up list action buttons
Dim oListOpt, body, content, link
Dim listact, action, caption, icon
Set oListOpt = ListOptions("listactions")
If ew_NotEmpty(oListOpt) And Demarrage.Export = "" And Demarrage.CurrentAction = "" Then
body = ""
links = Array()
For i = 0 to ListActions.Count - 1
Set listact = ListActions(i)
If listact.SelectType = EW_ACTION_SINGLE And listact.Allow Then
action = listact.Action
caption = listact.Caption
icon = ew_IIf(listact.Icon <> "", " " , "")
If UBound(links) < 0 Then
ReDim links(0)
Else
ReDim Preserve links(UBound(links)+1)
End If
links(UBound(links)) = "
"
If UBound(links) = 0 Then ' Single button
body = "" & Language.Phrase("ListActionButton") & ""
End If
End If
Next
If UBound(links) > 0 Then ' More than one buttons, use dropdown
body = ""
content = ""
For Each link In links
content = content & "
" & link & "
"
Next
body = body & "
" & content & "
"
body = "
" & body & "
"
End If
If UBound(links) >= 0 Then
oListOpt.Body = body
oListOpt.Visible = True
End If
End If
ListOptions("checkbox").Body = ""
Call RenderListOptionsExt
Call ListOptions_Rendered
End Sub
' Set up other options
Sub SetupOtherOptions()
Dim opt, item, DetailTableLink, ar, i, caption, url, addcaption
Set opt = ActionOptions
' Set up options default
Set opt = AddEditOptions
opt.UseImageAndText = True
opt.DropDownButtonPhrase = Language.Phrase("ButtonAddEdit")
opt.UseDropDownButton = False
opt.UseButtonGroup = True
opt.ButtonClass = "btn-sm" ' Class for button group
Set item = opt.Add(opt.GroupOptionName)
item.Body = ""
item.Visible = False
Set opt = DetailOptions
opt.UseImageAndText = True
opt.DropDownButtonPhrase = Language.Phrase("ButtonDetails")
opt.UseDropDownButton = False
opt.UseButtonGroup = True
opt.ButtonClass = "btn-sm" ' Class for button group
Set item = opt.Add(opt.GroupOptionName)
item.Body = ""
item.Visible = False
Set opt = ActionOptions
opt.UseImageAndText = True
opt.DropDownButtonPhrase = Language.Phrase("ButtonActions")
opt.UseDropDownButton = False
opt.UseButtonGroup = True
opt.ButtonClass = "btn-sm" ' Class for button group
Set item = opt.Add(opt.GroupOptionName)
item.Body = ""
item.Visible = False
' Filter button
Set opt = FilterOptions
Set item = opt.Add("savecurrentfilter")
item.Body = "" & Language.Phrase("SaveCurrentFilter") & ""
item.Visible = False
Set item = opt.Add("deletefilter")
item.Body = "" & Language.Phrase("DeleteFilter") & ""
item.Visible = False
opt.UseDropDownButton = True
opt.UseButtonGroup = Not FilterOptions.UseDropDownButton
opt.DropDownButtonPhrase = Language.Phrase("Filters")
' Add group option item
Set item = opt.Add(FilterOptions.GroupOptionName)
item.Body = ""
item.Visible = False
End Sub
' Render other options
Sub RenderOtherOptions()
Dim opt, item, i, action, caption, icon, Name, cancelurl
Set opt = ActionOptions
opt.UseImageAndText = True
' Set up list action buttons
Dim listact
For i = 0 to ListActions.Count - 1
Set listact = ListActions(i)
If listact.SelectType = EW_ACTION_MULTIPLE Then
action = listact.Action
caption = listact.Caption
icon = ew_IIf(listact.Icon <> "", " ", caption)
Set item = opt.Add("custom_" & Action)
item.Body = "" & icon & ""
item.Visible = listact.Allow
End If
Next
' Hide grid edit and other options
If TotalRecs <= 0 Then
Set opt = AddEditOptions
Set item = opt("gridedit")
If ew_NotEmpty(item) Then item.Visible = False
Set opt = ActionOptions
Call opt.HideAllOptions(Array())
End If
End Sub
' Process list action
Function ProcessListAction()
Dim userlist, user, sFilter, UserAction, Processed, ActionCaption
userlist = ""
user = ""
sFilter = Demarrage.GetKeyFilter
UserAction = Request.Form("useraction") & ""
Processed = False
If sFilter <> "" And UserAction <> "" Then
' Check permission first
Dim listact
ActionCaption = UserAction
If ListActions.Exists(UserAction) Then
Set listact = ListActions(UserAction)
ActionCaption = listact.Caption
If Not listact.Allow Then
errmsg = Replace(Language.Phrase("CustomActionNotAllowed"), "%s", ActionCaption)
If Request.Form("ajax") = UserAction Then ' Ajax
Response.Write "
" & errmsg & "
"
Else
FailureMessage = errmsg
End If
ProcessListAction = False
End If
End If
Dim cnn, sSql
Demarrage.CurrentFilter = sFilter
sSql = Demarrage.SQL
Set cnn = Demarrage.TableConnection
cnn.BeginTrans
Demarrage.CurrentAction = UserAction
' Load recordset
Dim Rs
Set Rs = ew_LoadRecordsetByDbid(sSql, Demarrage.TableDBID)
If Not Rs.EOF Then Rs.MoveFirst
' Call row custom action event
SelectedCount = Rs.RecordCount
SelectedIndex = 0
Do While Not Rs.EOF
SelectedIndex = SelectedIndex + 1
Processed = Row_CustomAction(UserAction, Rs)
If Not Processed Then
Exit Do
End If
Rs.MoveNext
Loop
Rs.Close
Set Rs = Nothing
If Processed Then
cnn.CommitTrans ' Commit the changes
If SuccessMessage = "" Then
SuccessMessage = Replace(Language.Phrase("CustomActionCompleted"), "%s", ActionCaption) ' Set up success message
End If
Else
cnn.RollbackTrans ' Rollback transaction
' Set up error message
If SuccessMessage <> "" Or FailureMessage <> "" Then
' Use the message, do nothing
ElseIf Demarrage.CancelMessage <> "" Then
FailureMessage = Demarrage.CancelMessage
Demarrage.CancelMessage = ""
Else
FailureMessage = Replace(Language.Phrase("CustomActionFailed"), "%s", ActionCaption)
End If
End If
Demarrage.CurrentAction = "" ' Clear action
If Request.Form("ajax") = UserAction Then ' Ajax
If SuccessMessage <> "" Then
Response.Write "
" & SuccessMessage & "
"
Call ClearSuccessMessage ' Clear message
End If
If FailureMessage <> "" Then
Response.Write "
" & FailureMessage & "
"
Call ClearFailureMessage ' Clear message
End If
ProcessListAction = True
End If
Else
ProcessListAction = False ' Not ajax request
End If
End Function
' Begin grid
Function MultiColumnBeginGrid()
' Get correct grid count
Dim cnt, div
div = ""
If ew_InArray(Demarrage.CurrentAction, Array("gridadd", "gridedit")) Then ' Grid add/edit
cnt = MultiColumnEditCnt
ElseIf Demarrage.CurrentAction = "edit" And Demarrage.RowType = EW_ROWTYPE_EDIT Then ' Inline edit row
cnt = MultiColumnEditCnt
Else
cnt = MultiColumnCnt
End If
GridCnt = GridCnt + cnt
ColCnt = ColCnt + 1
MultiColumnClass = "col-sm-" & cnt
' Close previous div
If GridCnt > 12 Then
GridCnt = cnt
ColCnt = 1
div = div & ""
End If
' Begin new div
If ColCnt = 1 Then
div = div & "
"
End If
MultiColumnBeginGrid = div
End Function
' End grid
Function MultiColumnEndGrid()
Dim div
div = ""
' Close previous div
If GridCnt > 0 Then
div = "
"
End If
MultiColumnEndGrid = div
End Function
' Set up search options
Sub SetupSearchOptions()
Dim item, SearchToggleClass
Set SearchOptions = New cListOptions
SearchOptions.TableVar = Demarrage.TableVar
ExportOptions.Tag = "div"
SearchOptions.TagClassName = "ewSearchOption"
' Button group for search
SearchOptions.UseDropDownButton = False
SearchOptions.UseImageAndText = True
SearchOptions.UseButtonGroup = True
SearchOptions.DropDownButtonPhrase = Language.Phrase("ButtonSearch")
' Add group option item
Set item = SearchOptions.Add(SearchOptions.GroupOptionName)
item.Body = ""
item.Visible = False
' Hide search options
If Demarrage.Export <> "" Or Demarrage.CurrentAction <> "" Then
Call SearchOptions.HideAllOptions(Array())
End If
If Not Security.CanSearch Then
Call SearchOptions.HideAllOptions(Array())
Call FilterOptions.HideAllOptions(Array())
End If
End Sub
Sub SetupListOptionsExt()
End Sub
Sub RenderListOptionsExt()
End Sub
Dim Pager
'
' Set up Starting Record parameters based on Pager Navigation
'
Sub SetupStartRec()
Dim PageNo
' Exit if DisplayRecs = 0
If DisplayRecs = 0 Then Exit Sub
If IsPageRequest Then ' Validate request
' Check for a START parameter
If Request.QueryString(EW_TABLE_START_REC).Count > 0 Then
StartRec = Request.QueryString(EW_TABLE_START_REC)
Demarrage.StartRecordNumber = StartRec
ElseIf Request.QueryString(EW_TABLE_PAGE_NO).Count > 0 Then
PageNo = Request.QueryString(EW_TABLE_PAGE_NO)
If IsNumeric(PageNo) Then
StartRec = (PageNo-1)*DisplayRecs+1
If StartRec <= 0 Then
StartRec = 1
ElseIf StartRec >= ((TotalRecs-1)\DisplayRecs)*DisplayRecs+1 Then
StartRec = ((TotalRecs-1)\DisplayRecs)*DisplayRecs+1
End If
Demarrage.StartRecordNumber = StartRec
End If
End If
End If
StartRec = Demarrage.StartRecordNumber
' Check if correct start record counter
If Not IsNumeric(StartRec) Or StartRec = "" Then ' Avoid invalid start record counter
StartRec = 1 ' Reset start record counter
Demarrage.StartRecordNumber = StartRec
ElseIf CLng(StartRec) > CLng(TotalRecs) Then ' Avoid starting record > total records
StartRec = ((TotalRecs-1)\DisplayRecs)*DisplayRecs+1 ' Point to last page first record
Demarrage.StartRecordNumber = StartRec
ElseIf (StartRec-1) Mod DisplayRecs <> 0 Then
StartRec = ((StartRec-1)\DisplayRecs)*DisplayRecs+1 ' Point to page boundary
Demarrage.StartRecordNumber = StartRec
End If
End Sub
'
' Load recordset
'
Function LoadRecordset(offset, rowcnt)
Dim sSql, rs, useSelectLimit, dbType, hasOrderBy
useSelectLimit = rowcnt > 0 And offset >= 0
dbType = ew_GetConnectionType(Demarrage.TableDBID)
If dbType = "MSSQL" Then
If ew_IsMsSql2012(Demarrage.TableDBID) Then dbType = "MSSQL2012" ' ASP
End If
' Load List page SQL
sSql = Demarrage.ListSQL
If useSelectLimit Then
hasOrderBy = Demarrage.SqlOrderBy <> "" Or Demarrage.SessionOrderBy <> ""
sSql = ew_GetSelectLimitSql(sSql, rowcnt, offset, hasOrderBy, dbType)
End If
' Load recordset
Set rs = ew_LoadRecordsetByDbid(sSql, Demarrage.TableDBID)
If Not useSelectLimit Or dbType <> "MSSQL2012" And dbType <> "MYSQL" And dbType <> "POSTGRESQL" Then ' ASP
If offset > 0 And Not rs.EOF Then rs.Move offset
End If
' Call Recordset Selected event
Call Demarrage.Recordset_Selected(rs)
Set LoadRecordset = rs
End Function
'
' Load row based on key values
'
Function LoadRow()
Dim RsRow, sSql, sFilter
sFilter = Demarrage.KeyFilter
' Call Row Selecting event
Call Demarrage.Row_Selecting(sFilter)
' Load SQL based on filter
Demarrage.CurrentFilter = sFilter
sSql = Demarrage.SQL
Call ew_SetDebugMsg("LoadRow: " & sSql) ' Show SQL for debugging
Set RsRow = ew_LoadRowByDbid(sSql, Demarrage.TableDBID)
If RsRow.EOF Then
LoadRow = False
Else
LoadRow = True
RsRow.MoveFirst
Call LoadRowValues(RsRow) ' Load row values
End If
RsRow.Close
Set RsRow = Nothing
End Function
'
' Load row values from recordset
'
Sub LoadRowValues(RsRow)
Dim sDetailFilter
If Not EW_DEBUG_ENABLED Then On Error Resume Next
If IsNull(RsRow) Then
Set RsRow = NewRow()
End If
' Call Row Selected event
Call Demarrage.Row_Selected(RsRow)
If ew_Empty(RsRow) Then Exit Sub
If RsRow.EOF Then Exit Sub
Demarrage.NumId.DbValue = RsRow("NumId")
Demarrage.Aide.DbValue = RsRow("Aide")
Demarrage.Help.DbValue = RsRow("Help")
End Sub
' Return a row with default values
Function NewRow
Dim cnn, rs, sSql, sFilter
' Clear any previous errors
Err.Clear
Set cnn = Demarrage.TableConnection
sFilter = Demarrage.CurrentFilter
Demarrage.CurrentFilter = "(0 = 1)"
sSql = Demarrage.SQL
Demarrage.CurrentFilter = sFilter
Set rs = Server.CreateObject("ADODB.Recordset")
rs.CursorLocation = 3 ' adUseClient
Call ew_SetDebugMsg("NewRow: " & sSql) ' Show SQL for debugging
rs.Open sSql, cnn, 3, 4 ' adOpenStatic, adLockBatchOptimistic
' Disconnect the Recordset
Set rs.ActiveConnection = Nothing
' Add new record
rs.AddNew
rs("Aide") = Null
rs("Help") = Null
' Return the recordset
If Err.Number = 0 Then
Set NewRow = rs
Else
Set NewRow = Nothing
End If
End Function
' Load DbValue from recordset
Sub LoadDbValues(Rs)
If Not EW_DEBUG_ENABLED Then On Error Resume Next
If ew_Empty(Rs) Then Exit Sub
If Rs.EOF Then Exit Sub
Demarrage.NumId.m_DbValue = Rs("NumId")
Demarrage.Aide.m_DbValue = Rs("Aide")
Demarrage.Help.m_DbValue = Rs("Help")
End Sub
' Load old record
Function LoadOldRecord()
' Load key values from Session
Dim bValidKey
bValidKey = True
If Demarrage.GetKey("NumId")&"" <> "" Then
Demarrage.NumId.CurrentValue = Demarrage.GetKey("NumId") ' NumId
Else
bValidKey = False
End If
' Load old record
OldRecordset = Null
If bValidKey Then
Demarrage.CurrentFilter = Demarrage.KeyFilter
Dim sSql
sSql = Demarrage.SQL
Set OldRecordset = ew_LoadRecordsetByDbid(sSql, Demarrage.TableDBID)
End If
Call LoadRowValues(OldRecordset) ' Load row values
LoadOldRecord = bValidKey
End Function
'
' Render row values based on field settings
'
Sub RenderRow()
' Initialize URLs
ViewUrl = Demarrage.ViewUrl("")
EditUrl = Demarrage.EditUrl("")
InlineEditUrl = Demarrage.InlineEditUrl
CopyUrl = Demarrage.CopyUrl("")
InlineCopyUrl = Demarrage.InlineCopyUrl
DeleteUrl = Demarrage.DeleteUrl
' Call Row Rendering event
Call Demarrage.Row_Rendering
'
' Common render codes for all row types
'
' NumId
Demarrage.NumId.CellCssStyle = "white-space: nowrap;"
' Aide
Demarrage.Aide.CellCssStyle = "width: 400px;"
' Help
Demarrage.Help.CellCssStyle = "width: 400px;"
'
' View Row
'
If Demarrage.RowType = EW_ROWTYPE_VIEW Then ' View row
' Aide
Demarrage.Aide.ViewValue = Demarrage.Aide.CurrentValue
Demarrage.Aide.ViewCustomAttributes = ""
' Help
Demarrage.Help.ViewValue = Demarrage.Help.CurrentValue
Demarrage.Help.ViewCustomAttributes = ""
' View refer script
' Aide
Demarrage.Aide.LinkCustomAttributes = ""
Demarrage.Aide.HrefValue = ""
Demarrage.Aide.TooltipValue = ""
' Help
Demarrage.Help.LinkCustomAttributes = ""
Demarrage.Help.HrefValue = ""
Demarrage.Help.TooltipValue = ""
End If
' Call Row Rendered event
If Demarrage.RowType <> EW_ROWTYPE_AGGREGATEINIT Then
Call Demarrage.Row_Rendered
End If
End Sub
' Set up Breadcrumb
Sub SetupBreadcrumb()
Dim PageId, url
Set Breadcrumb = New cBreadcrumb
url = Mid(ew_CurrentUrl(), InStrRev(ew_CurrentUrl(), "/") + 1)
url = ew_RegExReplace("\?cmd=reset(all){0,1}$", url, "") ' Remove cmd=reset / cmd=resetall
Call Breadcrumb.Add("list", Demarrage.TableVar, url, "", Demarrage.TableVar, True)
End Sub
' Setup lookup filters of a field
Sub SetupLookupFilters(fld, pageId)
pageId = ew_IIf(ew_EmptyStr(pageId), Demarrage_list.PageID, pageId)
Select Case fld.FldVar
End Select
End Sub
' Setup AutoSuggest filters of a field
Sub SetupAutoSuggestFilters(fld, pageId)
pageId = ew_IIF(ew_EmptyStr(pageId), Demarrage_list.PageID, pageId)
Select Case fld.FldVar
End Select
End Sub
Sub ExportPdf(html)
Response.Write html
End Sub
' Page Load event
Sub Page_Load()
'Response.Write "Page Load"
End Sub
' Page Unload event
Sub Page_Unload()
'Response.Write "Page Unload"
End Sub
' Page Redirecting event
Sub Page_Redirecting(url)
'url = newurl
End Sub
' Message Showing event
' typ = ""|"success"|"failure"|"warning"
Sub Message_Showing(msg, typ)
' Example:
'If typ = "success" Then
' msg = "your success message"
'ElseIf typ = "failure" Then
' msg = "your failure message"
'ElseIf typ = "warning" Then
' msg = "your warning message"
'Else
' msg = "your message"
'End If
End Sub
' Page Render event
Sub Page_Render()
'Response.Write "Page Render"
End Sub
' Page Data Rendering event
Sub Page_DataRendering(header)
' Example:
'header = "your header"
End Sub
' Page Data Rendered event
Sub Page_DataRendered(footer)
' Example:
'footer = "your footer"
End Sub
' Form Custom Validate event
Function Form_CustomValidate(CustomError)
'Return error message in CustomError
Form_CustomValidate = True
End Function
' ListOptions Load event
Sub ListOptions_Load()
'Example:
' Dim opt
' Set opt = ListOptions.Add("new")
' opt.OnLeft = True ' Link on left
' Call opt.MoveTo(0) ' Move to first column
End Sub
' ListOptions Rendering event
Sub ListOptions_Rendering()
'Example:
' xxx.DetailAdd = (...condition...) ' Set to True or False conditionally
' xxx.DetailEdit = (...condition...) ' Set to True or False conditionally
' xxx.DetailView = (...condition...) ' Set to True or False conditionally
End Sub
' ListOptions Rendered event
Sub ListOptions_Rendered()
'Example:
'ListOptions.GetItem("new").Body = "xxx"
End Sub
' Row Custom Action event
Function Row_CustomAction(action, rs)
' Return False to abort
Row_CustomAction = True
End Function
' Page Exporting event
' ExportDoc = export document object
Function Page_Exporting()
'ExportDoc.Text = "my header" ' Export header
'Page_Exporting = False ' Return False to skip default export and use Row_Export event
Page_Exporting = True ' Return True to use default export and skip Row_Export event
End Function
' Row Export event
' ExportDoc = export document object
Sub Row_Export(rs)
'ExportDoc.Text = ExportDoc.Text & "my content" ' Build HTML with field value: rs("MyField") or MyField.ViewValue
End Sub
' Page Exported event
' ExportDoc = export document object
Sub Page_Exported()
'ExportDoc.Text = ExportDoc.Text & "my footer" ' Export footer
'Response.Write ExportDoc.Text
End Sub
End Class
%>